'use strict';

function average_uneven(collection) {

  //在这里写入代码
  let arr=[];
  for(let i of collection)
  {
    if(i%2!=0)
    {
      arr.push(i);
    }
  }
  let result=arr. reduce(function(sum,x){
    return sum+x;
  },0);
  return result/arr.length;
}

module.exports = average_uneven;
